Ray tracing is a computer-based technique that may be used for creating photorealistic computer graphics in video game animation, motion pictures, and other media applications. In ray tracing, paths (“rays”) connecting light sources to objects are identified and summed. Rays are traced along a line of sight to determine visibility and from light sources to determine illumination.
A ray generally originates at a point in space described by a position vector and travels along a direction vector. Ray tracing may be used to determine visibility by directing the ray from the origin along a line of sight described by the direction vector. The ray is tested for intersection against objects within a virtual scene to determine the nearest visible surface along that line of sight. Ray tracing can generate an image by tracing the ray through pixels in a plane. Ray tracing is capable of producing a very high degree of photorealism, usually higher than that of other rendering methods. Ray tracing is capable of simulating a wide variety of optical effects such as reflection and refraction, as well as scattering and chromatic aberration. Scenes created using ray tracing may incorporate data from images or models captured by digital photography.
In ray tracing, a single spatial data structure, such as a tree structure, may be used to represent the image of a particular frame. To avoid having two or more processing elements simultaneously attempt to modify the spatial data structure, ray tracing techniques are usually implemented using serial algorithms in which the steps of the algorithm are performed one after another. For this reason, current ray tracing techniques may not be able to take advantage of multiple core processors that can process many steps in parallel.